package com.cake.ssm.controller;

import com.cake.ssm.po.User;
import com.cake.ssm.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;


    @RequestMapping("/loadAllUser")
    private List<User> LoadAllUser(){
        List<User> list = null;
        try {
            list = userService.loadAllUser();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return list;

    }

}

